package cn.school.entity;

import java.io.Serializable;

public class Examresult implements Serializable {
	private long id;
	private String exam_date;
	private long sb_id;
	private long st_id;
	private float score;
	private Subject subject;
	private Student student;

	@Override
	public String toString() {
		if (subject == null && student == null) {
			return id + "\t" + score + "\t" + st_id + "\t" + sb_id + "\t" + exam_date;
		}
		else if (subject != null && student == null) {
			return subject.toString();
		}
		return "Examresult [id=" + id + ", exam_date=" + exam_date + ", sb_id=" + sb_id + ", st_id=" + st_id
				+ ", score=" + score + ", subject=" + subject + ",student=" + student + "]";
	}

	public Examresult() {

	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getExam_date() {
		return exam_date;
	}

	public void setExam_date(String exam_date) {
		this.exam_date = exam_date;
	}

	public long getSb_id() {
		return sb_id;
	}

	public void setSb_id(long sb_id) {
		this.sb_id = sb_id;
	}

	public long getSt_id() {
		return st_id;
	}

	public void setSt_id(long st_id) {
		this.st_id = st_id;
	}

	public float getScore() {
		return score;
	}

	public void setScore(float score) {
		this.score = score;
	}

	public Subject getSubject() {
		return subject;
	}

	public void setSubject(Subject subject) {
		this.subject = subject;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

}